#ifndef EBUTTON_H
#define EBUTTON_H
#include <QPushButton>
#include <QMouseEvent>
#include <QIcon>

class EButton : public QPushButton
{
    Q_OBJECT
public:
    EButton(QWidget *parent = 0);
    virtual ~EButton();
    void SetTexts(const char *text);
    void SetTexts(const QString &text);
    void SetButtonIcons(const QIcon &normal, const QIcon &focus = QIcon(), const QIcon &pressed = QIcon() );
    void SetButtonIcons(const char *path);
protected:
    void enterEvent(QEvent *event);
    void leaveEvent(QEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

    void paintEvent(QPaintEvent *event);

private:
    QIcon   m_normalIcon;
    QIcon   m_focusIcon;
    QIcon   m_pressedIcon;
    QIcon   m_forbid;

    QString m_text = "";
};

#endif // EBUTTON_H
